import mongoose from 'mongoose';

// 档案模型
const archiveSchema = new mongoose.Schema({
    code: {
      type: Number,
      required: true,
      unique: true,  // 唯一索引
    },
    name: {
      type: String,
      required: true,
    }
  })
  
export default mongoose.model('Ingredient', archiveSchema, 'ingredient');  // 明确集合名称
  